package com.xncoding.aop.aspect;

import java.util.ArrayList;
import java.util.List;

public class User {
    public String name ;
    public String password;
    public List<User> sons ;

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", sons=" + sons +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public List<User> getSons() {
        if (this.sons == null) {
            this.sons = new ArrayList<>();
        }
        return sons;
    }

    public void setSons(List<User> sons) {
        this.sons = sons;
    }
}
